From f3245359de83ef03c99cbb51dbd9d08e0479c191 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 18 May 2007 22:31:48 +0000 Subject: [PATCH] (ispell-get-word): Return markers for start and end positions. (ispell-word): Assume END is a marker. --- lisp/textmodes/ispell.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index e4b2dd9f040..b274185bf17 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -1669,7 +1669,7 @@ quit spell session exited." ;; to avoid collapsing markers before and after ;; into a single place. (ispell-insert-word new-word) - (delete-region (point) (+ (point) (- end start))) + (delete-region (point) end) ;; It is meaningless to preserve the cursor position ;; inside a word that has changed. (setq cursor-location (point)) @@ -1751,8 +1751,8 @@ which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'." ;; return dummy word when just flagging misspellings (list "" (point) (point)) (error "No word found to check!")) - (setq start (match-beginning 0) - end (point) + (setq start (copy-marker (match-beginning 0)) + end (point-marker) word (buffer-substring-no-properties start end)) (list word start end)))) -- 2.30.2